<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        background-color: gray;
        height: 300px;
      }

      /* 目标伪类。路径出现了#four，会跳到id=four身上，所以选中的是它 */
      div:target {
        background-color: green;
      }
    </style>
  </head>
  <body>
    <a href="#one">go one</a>
    <a href="#two">go two</a>
    <a href="#three">go three</a>
    <a href="#four">go four</a>

    <div id="one">1</div>
    <br />
    <div id="two">2</div>
    <br />
    <div id="three">3</div>
    <br />
    <div id="four">4</div>
  </body>
</html>
